﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wallpaper.Models.DTOs.Responses;

namespace Wallpaper.Services.IService
{
    public interface IPermissionService
    {
        /// <summary>
        /// 获取所有权限
        /// </summary>
        /// <returns></returns>
        Task<List<PermissionTreeResponse>> GetPermissionTreeAsync();

        /// <summary>
        /// 判断是否有权限
        /// </summary>
        /// <param name="roleCode"></param>
        /// <param name="requiredPermission"></param>
        /// <returns></returns>
        Task<bool> HasPermissionAsync(string roleCode, string requiredPermission);
    }
}
